/*
 * ESHealthyHelix.java
 *
 * Created on December 30, 2007, 8:31 PM
 *
 * Copyright (C) 2007-2008  Hylke van der Schaaf
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, in version 3 of the License.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package hextd.sprite;

import hextd.util.Context;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;

/**
 *
 * @author hylke
 */
public class ESHealthyHelix extends EnemySpriteBaseRotor {

	private float healingRate = 0.05f / 20f;

	/** Creates a new instance of ESHealthyHelix */
	public ESHealthyHelix() {
		super("Healthy Helix", true);
		this.rotPerTime = (float) Math.toRadians(10.0);
		this.damageColor = EnemySprite.COLOR.OTHER;
		this.damageColorAnti = EnemySprite.COLOR.OTHER;
	}

	protected void doInit(Context context, int path, float delay, long health, int price, EnemySprite.Size s) {
		context.loadSvg("hh", "images/image1.svg");
		super.doInit(context, path, delay, health, price, s);
	}

	public String getInfoString() {
		String retString = "";
		retString += "<h1>Healthy Helix</h1>" +
				"<p>" +
				"This enemy regenerates it's health. " +
				"It takes about 20 seconds to go from near-dead to fully healed. " +
				"Wounding them is meaningless, you have to kill them fast!" +
				"</p>" +
				"<p>" + super.getInfoString() + "</p>";
		return retString;
	}

	public void doTick(int gameTime) {
		if (!this.inactive && !this.dead) {
			if (this.health < this.healthMax) {
				this.health += Math.max(1, this.healthMax * this.healingRate);
				if (this.health > this.healthMax) {
					this.health = this.healthMax;
				}
				this.fireStatusChangedEvent();
			}
		}
		super.doTick(gameTime);
	}

	public Color generateColor() {
		return null;
	}

	public Stroke generateStroke() {
		return null;
	}

	public Shape generateShape() {
		return null;
	}

	public String getSvgName() {
		return "hh";
	}
}
